Alternative Fuel Types

In recent, unleaded cars are becoming less beneficial politically, environmentally, and economically. Starting research and development on several different types of fuel alternatives. We are all familiar with gasoline and electric cars but there are a few others. A datasheet taken from “https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-03-01/stations.csv” shows all public and private fueling stations for several different fuel types across the whole country. Below I have taken the information and formatted it for use here in the Utah area. Below is an example of how I filtered out the public compressed natural gas stations in Utah. This is then repeated for all the alternative stations.

img <- readJPEG("FuelTypes.jpg")
grid.raster(img)

#stations <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-03-01/stations.csv')

station <- stations[which(stations$ACCESS_CODE == 'public'),]

Ustation <- station[which(station$STATE == 'UT'),]

Ustation <- Ustation[!duplicated(Ustation$LATITUDE) & !duplicated(Ustation$LONGITUDE),]

# This is using the data taken on electric stations in Utah, removing duplicates

UCNGS <- Ustation[which(Ustation$FUEL_TYPE_CODE == 'CNG'),]

UCDF <- data.frame(UCNGS$LATITUDE,UCNGS$LONGITUDE,site=factor(1:27))

DC <-  distm(UCDF[,c(2,1)]) %>%  as.data.frame()

DC[DC==0] <- NA

MCDis <- apply(DC,1,min,na.rm=TRUE)

minC <- c()
x = 1
for(i in 1:length(MCDis)){
  minC[x] <- which(DC[,i] == MCDis[i])  
  x=x+1
}

UCDF$closest <- minC

nearest_distC <- c()
for(i in 1:length(UCDF$closest)){
  nearest_distC[i] <- distHaversine(UCDF[i,c(2,1)],UCDF[UCDF$closest[i],c(2,1)])  
}

UCDF$nearest_dist_m <- nearest_distC

UCDF
##    UCNGS.LATITUDE UCNGS.LONGITUDE site closest nearest_dist_m
## 1        40.76498       -111.9223    1       7       5194.022
## 2        41.73463       -111.8615    2      10      32178.780
## 3        39.58680       -110.8134    3       5      97258.529
## 4        38.78662       -112.0841    4      18      52220.955
## 5        40.18736       -111.6404    5       9      15343.316
## 6        40.60754       -111.9962    6      21       1674.542
## 7        40.78137       -111.9800    7      27       4003.765
## 8        40.67152       -111.9070    8       6      10370.924
## 9        40.30676       -111.7306    9      23      12819.482
## 10       41.48561       -112.0578   10      17      28840.340
## 11       40.88367       -111.8988   11       7      13282.310
## 12       37.16168       -113.4347   12      15      15445.950
## 13       40.73941       -111.9921   13      26       3251.499
## 14       38.53676       -109.5118   14       3     162236.696
## 15       37.08159       -113.5768   15      12      15445.950
## 16       40.43341       -109.4986   16       3     146453.995
## 17       41.22931       -112.0074   17      19       7698.230
## 18       39.25507       -112.1163   18       4      52220.955
## 19       41.17666       -111.9478   19      17       7698.230
## 20       41.03578       -111.9495   20      19      15683.194
## 21       40.59446       -111.9864   21       6       1674.542
## 22       38.16439       -112.2782   22       4      71300.536
## 23       40.38980       -111.8353   23       9      12819.482
## 24       40.73390       -111.4993   24       8      35097.241
## 25       37.72495       -113.0570   25      12      71035.577
## 26       40.71856       -112.0191   26      13       3251.499
## 27       40.77333       -112.0263   27       7       4003.765

This is the data set for compressed natural gas in Utah

Compressed Natural Gas Stations

img1 <- readJPEG("UTCmap.jpeg")
grid.raster(img1)

This is a image of the locations of compressed natural gas stations. Stations more than 100 miles apart are displayed as red.

Electric Charging Stations

UELECS <- Ustation[which(Ustation$FUEL_TYPE_CODE == 'ELEC'),]

UEDF <- data.frame(UELECS$LATITUDE,UELECS$LONGITUDE,site=factor(1:802))

DEC <-  distm(UEDF[,c(2,1)]) %>%  as.data.frame()

DEC[DEC==0] <- NA

MEDis <- apply(DEC,1,min,na.rm=TRUE)

minE <- c()
x = 1
for(i in 1:length(MEDis)){
  minE[x] <- which(DEC[,i] == MEDis[i])  
  x=x+1
}

UEDF$closest <- minE

nearest_distE <- c()
for(i in 1:length(UEDF$closest)){
  nearest_distE[i] <- distHaversine(UEDF[i,c(2,1)],UEDF[UEDF$closest[i],c(2,1)])  
}

UEDF$nearest_dist_m <- nearest_distE

#Map of electric stations
img2 <- readJPEG("UTEmap.jpeg")
grid.raster(img2)

This is a image of the locations of electric charging stations. Stations more than 100 miles apart are displayed as red.

Liquified Natural Gas Stations

# LNG information Two stations####

ULNGS <- Ustation[which(Ustation$FUEL_TYPE_CODE == 'LNG'),]

ULDF <- data.frame(ULNGS$LATITUDE,ULNGS$LONGITUDE,site=factor(1:2))

DLC <-  distm(ULDF[,c(2,1)]) %>%  as.data.frame()

DLC[DLC==0] <- NA

MLDis <- apply(DLC,1,min,na.rm=TRUE)

minL <- c()
x = 1
for(i in 1:length(MLDis)){
  minL[x] <- which(DLC[,i] == MLDis[i])  
  x=x+1
}

ULDF$closest <- minL

nearest_distL <- c()
for(i in 1:length(ULDF$closest)){
  nearest_distL[i] <- distHaversine(ULDF[i,c(2,1)],ULDF[ULDF$closest[i],c(2,1)])  
}

ULDF$nearest_dist_m <- nearest_distL

#Map of electric stations
img3 <- readJPEG("UTLDmap.jpeg")
grid.raster(img3)

This is a image of the locations of liquified natural gas stations. Stations more than 100 miles apart are displayed as red.

Propane Stations

ULPGS <- Ustation[which(Ustation$FUEL_TYPE_CODE == 'LPG'),]

ULPGDF <- data.frame(ULPGS$LATITUDE,ULPGS$LONGITUDE,site=factor(1:38))

DLPGC <-  distm(ULPGDF[,c(2,1)]) %>%  as.data.frame()

DLPGC[DLPGC==0] <- NA

MLPGDis <- apply(DLPGC,1,min,na.rm=TRUE)

minLPG <- c()
x = 1
for(i in 1:length(MLPGDis)){
  minLPG[x] <- which(DLPGC[,i] == MLPGDis[i])  
  x=x+1
}

ULPGDF$closest <- minLPG

nearest_distLPG <- c()
for(i in 1:length(ULPGDF$closest)){
  nearest_distLPG[i] <- distHaversine(ULPGDF[i,c(2,1)],ULPGDF[ULPGDF$closest[i],c(2,1)])  
}

ULPGDF$nearest_dist_m <- nearest_distLPG

# lpg map
img3 <- readJPEG("UTLmap.jpeg")
grid.raster(img3)

This is a image of the locations of propane stations. Stations more than 100 miles apart are displayed as red.

There were other stations in the dataset but there were either one or no stations of that type here in Utah

One public biodiesel station in Midvale, Utah. One public 85% Ethanol station in Orem, Utah. No public Hydrogen stations were found.

Conclusions

Much like any argument for fuel alternatives, ease of access is one of the main issues. We find that there are more electric charging stations all across the state with 802 public stations, more if we include the duplicates. As it stands I would use an electric vehicle as a commuter car and for casual driving locally.